<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="screen">
        <ul>
            <li>aaa</li>
            <li>aaa</li>
            <li>aaa</li>
        </ul>
    </div>
    <button id="btn">这是获取内容的按钮</button>
    <button id="btn2">这是修改内容的按钮</button>

    <script>
        let btn = document.querySelector('#btn');
        btn.onclick = function() {
            let screen = document.querySelector('#screen');
            console.log(screen.innerHTML);
        }
        let btn2 = document.querySelector('#btn2');
        btn2.onclick = function() {
            let screen = document.querySelector("#screen");
            screen.innerHTML = '<h1>修改后的内容</h1>';
        }
    </script>
</body>
</html>